import request from '@/router/axios';

// 获取订单的花费
export const getOfferCost = (startDate, endDate) => {
  return request({
    url: '/api/beetles-business/graph/offer/cost',
    method: 'get',
    params: {
      startDate, endDate
    }
  });
}

// 获取优化师的花费
export const getOmCost = (startDate, endDate) => {
  return request({
    url: '/api/beetles-business/graph/om/cost',
    method: 'get',
    params: {
      startDate, endDate
    }
  });
}

// 获取lineCharts接口返回的数据
export const getDailyReport = (data) => {
  return request({
    url: '/api/beetles-business/graph/lineChart',
    method: 'post',
    data: data
  });
}

/**
 * 获取lineCharts 账户的下拉信息
 */
export const dailyReportOptions = (params) =>{
  return request({
    url:'/api/beetles-business/graph/dailyReportOptions',
    method:'get',
    params:{
      offerId:params.offerId,omId:params.omId
    }
  })
}
